//
//  ForgotPWDViewController.m
//  lagou
//
//  Created by mafeng on 16/7/16.
//  Copyright © 2016年 mafeng. All rights reserved.
//

#import "ForgotPWDViewController.h"

@interface ForgotPWDViewController ()
@property (nonatomic, strong) UITextField *phoneTextField;
@property (nonatomic, strong) UITextField *verificationCodeTextField;
@end

@implementation ForgotPWDViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.hidden = NO;
     UIColor *color = [UIColor colorWithRed:0 / 255.0 green:180 / 255.0 blue:140 / 255.0 alpha:1.0];
#pragma mark -- 标题
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(150, 100, 90, 50)];
    // titleLabel.backgroundColor = [UIColor blueColor];
    [titleLabel setText:@"验证手机"];
    titleLabel.textAlignment = UITextAlignmentCenter;
    titleLabel.font = [UIFont systemFontOfSize:21];
    [self.view addSubview:titleLabel];
#pragma mark -- 手机号输入框
    UIImageView *phoneImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
    phoneImageView.image = [UIImage imageNamed:@"icon_username"];
    
    self.phoneTextField = [[UITextField alloc] initWithFrame:CGRectMake(20, 180, 380, 50)];
    self.phoneTextField.leftView = phoneImageView;
    self.phoneTextField.leftViewMode = UITextFieldViewModeAlways;
    self.phoneTextField.placeholder = @"手机号 (仅支持中国大陆号)";
    // self.phoneTextField.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:self.phoneTextField];
    
#pragma mark -- 验证码输入框
    // 左侧的图标
    UIImageView *verificationCodeImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
    verificationCodeImageView.image = [UIImage imageNamed:@"icon_username"];
    // 右侧的文字
    UIButton *getVerificationCodeButton = [UIButton buttonWithType:UIButtonTypeSystem];
    getVerificationCodeButton.frame = CGRectMake(0, 0, 130, 50);
    [getVerificationCodeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
    getVerificationCodeButton.font = [UIFont systemFontOfSize:21];
    [getVerificationCodeButton setTitleColor:color forState:UIControlStateNormal];
    
    self.verificationCodeTextField = [[UITextField alloc] initWithFrame:CGRectMake(20, 232, 380, 50)];
    self.verificationCodeTextField.leftView = verificationCodeImageView;
    self.verificationCodeTextField.leftViewMode = UITextFieldViewModeAlways;
   // self.verificationCodeTextField.backgroundColor = [UIColor yellowColor];
    self.verificationCodeTextField.placeholder = @"验证码";
    self.verificationCodeTextField.rightView = getVerificationCodeButton;
    self.verificationCodeTextField.rightViewMode = UITextFieldViewModeAlways;
    [self.view addSubview:self.verificationCodeTextField];
    
#pragma mark -- 下一步按钮
    UIButton *nextStepButton = [[UIButton alloc] initWithFrame:CGRectMake(18, 350, 380, 50)];
    nextStepButton.backgroundColor = color;
    nextStepButton.layer.cornerRadius = 5;
    [nextStepButton maskView];
    [nextStepButton setTitle:@"下一步" forState:UIControlStateNormal];
    [nextStepButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.view addSubview:nextStepButton];
#pragma mark -- 邮箱用户找回密码, 请 标签
    UILabel *mailLabel = [[UILabel alloc]initWithFrame:CGRectMake(18, 410, 170, 30)];
    mailLabel.text = @"邮箱用户找回密码, 请";
    [self.view addSubview:mailLabel];
#pragma mark -- 点击这里 按钮
    UIButton *clickHereButton = [UIButton buttonWithType:UIButtonTypeSystem];
    clickHereButton.frame = CGRectMake(180, 410, 70, 30);
    [clickHereButton setTitle:@"点击这里" forState:UIControlStateNormal];
    clickHereButton.font = [UIFont systemFontOfSize:17];
    [clickHereButton setTitleColor:color forState:UIControlStateNormal];
    [self.view addSubview:clickHereButton];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
